import { ObjectOnlyPushSet } from '../Func/uniFunc/Func';
import { uni_load } from './Classes/cla_uni_load';
import { win_load, win_load_prop_space_Arr } from './Classes/cla_win_load';
import { spacename_win_load } from './DataDefine/sourceData';

/**
 * 总局 静态
 */
let winload = {};
winload[spacename_win_load] = new win_load();

/**
 * 创建 全局 键值域
 * @param {string} spacename
 * @returns {uni_load}
 */
function create_winload(spacename) {
  // console.log(winload);
  ObjectOnlyPushSet(
    winload[spacename_win_load],
    spacename,
    new uni_load(spacename),
    win_load_prop_space_Arr
  );
  return winload[spacename_win_load][spacename];
}

export { create_winload };
